package top.pengdong.pictureShare.common.model;

public enum ResultCode {

    CLIENT_AUTHENTICATION_FAILED(1001,"客户端认证失败"),
    USERNAME_OR_PASSWORD_ERROR(1002,"用户名或密码错误"),
    UNSUPPORTED_GRANT_TYPE(1003, "不支持的认证模式"),
    NO_PERMISSION(1005,"无权限访问！"),
    UNAUTHORIZED(504, "系统错误"),
    INVALID_TOKEN(1004,"无效的token"),
    REGISTER_ERROR(1013, "注册失败"),
    REGISTER_MORE(1014, "频繁注册"),
    REGISTER_SUCCESS(1014, "注册成功"),
    REGISTER_TIME_ERROR(402, "注册超时"),
    OVER_IMAGE(1007, "上传失败，请注意格式"),
    UNLIKE_STATUS(1008, "未点赞状态"),
    HAVE_LIKE_STATUS(1009, "已经点赞了"),
    HAVE_COLLECTION_STATUS(1010, "已经收藏了"),
    UNCOLLECTION_STATUS(1011, "未收藏状态"),
    NO_ENOUGH_COMMENT(1012, "评论字数不够"),
    UN_PUBLISH(1006, "未发布文章"),
    USER_IS_BAN(2000, "用户处于禁言状态");

    private final int code;

    private final String msg;

    private ResultCode(int code,String msg){
        this.code=code;
        this.msg=msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}